package com.cgx.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @author chenguanxin
 * @date 2021-02-19 22:37
 */
@Data
@Document(indexName = "city_db", type = "city_table")
public class City implements Serializable {
    @Id
    private String id;

    @Field(type= FieldType.keyword)
    private String code;

    @Field(type= FieldType.keyword)
    private String cityName;

    @Field(type= FieldType.text, analyzer = "ik_max_word")
    private String cityAllName;

    @Field(type= FieldType.keyword)
    private String latitude;

    @Field(type= FieldType.keyword)
    private String longitude;
}
